package com.bed.lovewithpatientbed.service.impl;

import com.bed.lovewithpatientbed.dao.MenuDao;
import com.bed.lovewithpatientbed.pojo.Menu;
import com.bed.lovewithpatientbed.service.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author xuxiaoding
 * @version 1.0.0
 * @ClassName MenuServceImpl.java
 * @Description TODO
 */
@Service
public class MenuServiceImpl implements IMenuService {

    private MenuDao menuDao;

    @Autowired
    public void setMenuDao(MenuDao menuDao) {
        this.menuDao = menuDao;
    }

    @Override
    public Menu retrieveMenuByMenuId(Integer menuId) {
        if (menuId == null || menuId < 1) {
            return null;
        }
        return menuDao.selectByPrimaryKey(menuId);
    }
}
